<?php defined('BASEPATH') OR exit('No direct script access allowed');

if ( ! function_exists('image_src') ) {
	//$folder = p | c
	function image_src($file = '',$folder = 'p',$thumbs = NULL ) {
		$result = base_url('uploads/no_img.png');
		$fol = "";
		if($thumbs)
		{
			if($thumbs  == 1)//$this->attribute('thumbs')
				$fol = "thumbs/";
			if($thumbs  =='home')
				$fol = "home/";				
		}
		$thumbs      = $fol;//$this->attribute('thumbs') ? 'thumbs/' : '';
		$image = 'uploads/shop/p/'.$thumbs.$file;
		if(is_file('uploads/shop/p/'.$thumbs.$file))
			$result = base_url('uploads/shop/p/'.$thumbs.$file);
		return $result;
	}
}
